var h = document.getElementsByTagName("html")[0];
var body = document.getElementsByTagName("body")[0];
var p = ["OωO", "(๑•́ ∀ •̀๑)", "(๑•́ ₃ •̀๑)", "(๑•̀_•́๑)", "o(≧v≦)o~~"];
var zi = ["富强", "民主", "文明", "和谐", "自由", "平等", "公正", "法治", "爱国", "敬业", "诚信", "友善"];
var fuhao=["♥","♬","♩","♠","♦","♪","♫"]

h.onclick = function (e) {
    var e = e||window.event; 
    var el = document.createElement("b");
    el.style.color = "#FF1493";
    el.style.zIndex = 9999;
    el.style.position = "absolute";
    var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
    var scrollY = document.documentElement.scrollTop || document.body.scrollTop;
    var x = e.pageX||e.clientX+ scrollX;
    var y = e.pageY||e.clientY+ scrollY;

    el.style.left = (x - 10) + "px";
    el.style.top = (y - 20) + "px";
    el.innerText = fuhao[Math.floor(Math.random() * 7)];
    var increase = 0;
    el.style.fontSize = Math.random() * 2 + 10 + "px";
    var anim = setInterval(function () {
        if (++increase == 150) {
            clearInterval(anim);
            body.removeChild(el);
        }
        el.style.top = y - 20 - increase + "px";
        el.style.opacity = (150 - increase) / 120;
    }, 8);
    body.appendChild(el);
}

let bann=document.getElementById('ty');
bann.onclick=function(){
    window.location.href="https://oix87.gitee.io/oixan.html";
}
// bann.innerText="oix87";
/*
str = "欢迎来到oixan_的博客！";
var idx = 0;
function typing() {
    var divTyping = document.getElementById('ty');
    if (idx <= str.length) {
        divTyping.innerHTML = str.slice(0, idx++) + '_';
        setTimeout('typing()', 200);//递归调用
    }
    else {
        divTyping.innerHTML = str;//结束打字,移除 _ 光标
    }
}
typing();
*/